import reshandler from '../response-handler'
import icon1 from 'assets/uicon.jpg'
import icon2 from 'assets/uicon.jpg'
import icon3 from 'assets/uicon.jpg'
import icon4 from 'assets/uicon.jpg'
import icon5 from 'assets/uicon.jpg'
import icon6 from 'assets/uicon.jpg'
import icon7 from 'assets/uicon.jpg'
function makeData(res) {
	return {
		title: '适宜旅游去哪里',
		content: '这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容',
		name:'长春卡欧车友会',
		time:'10:48',
		attendNum:'111',
		star:'10',
//		video:'http://www.carowl.cn/upload/shop/256181ec2e324ce5a563a1184fcda130/media/201802/040740a4-950c-4235-a11a-4bc6f359ba83.mp4',
		images:[icon1,icon2,icon3,icon4],
		avatar:'',
	}
}
function getCarFriend(params){
	let that = this
	return new Promise(function (resolve, reject) {
        that.$.get({
        	methodName:'QueryFleetList',
        	index:params.index,
        	count:params.count
        }).then(resp => {
            resolve(resp)
        }).catch(err => {
            reject(err)
        })
    })
}
export default function(params, success, fail) {
	getCarFriend.bind(this)(params)
	.then(reshandler.success(success, fail, makeData), reshandler.error(fail))
//	success({
//		title: '适宜旅游去哪里',
//		content: '这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容这是内容',
//		name:'长春卡欧车友会',
//		time:'10:48',
//		attendNum:'111',
//		star:'10',
//		video:'http://www.carowl.cn/upload/shop/256181ec2e324ce5a563a1184fcda130/media/201802/040740a4-950c-4235-a11a-4bc6f359ba83.mp4'
//		images:[icon1,icon2,icon3,icon4],
//		avatar:'',
//	})
}